package gcb.metalsys.entity.cop;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2020-07-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CopWarehouse extends Model<CopWarehouse> {

    private static final long serialVersionUID = 1L;

    
    @TableId(value = "warehouse_id", type = IdType.AUTO)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long warehouseId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long userId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long departmentId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long productId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer metalSize;
    @TableField(exist = false)
    private String warehouseName;

    public CopWarehouse() {
    }

    public CopWarehouse(Long userId, Long departmentId, Long productId, Integer metalSize) {
        this.userId = userId;
        this.departmentId = departmentId;
        this.productId = productId;
        this.metalSize = metalSize;
    }

    @Override
    protected Serializable pkVal() {
        return this.warehouseId;
    }

}
